package com.fare.taluo.core.domain.hibernate;

import java.util.Date;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.dayatang.domain.QuerySettings;
import com.dayatang.hibernate.EntityRepositoryHibernate;
import com.fare.taluo.core.domain.entity.pretreatment.QueueLineEntity;
import com.fare.taluo.core.domain.entity.pretreatment.QueueLineRepository;
import com.fare.taluo.core.domain.queue.message.QueueSMSMessageEntity;
import com.fare.taluo.core.domain.queue.message.repository.QueueSMSMessageRepository;
import com.foreveross.threadpool.queue.WorkQueue;
@Repository
public class QueueBasicDataRepositoryImpl extends EntityRepositoryHibernate
implements QueueLineRepository{
	public List<QueueLineEntity> listPlanStartEntity(int maxSize){
		return super.find(QuerySettings.create(QueueLineEntity.class).lt("planStartTime", new Date())
				.eq("status", WorkQueue.STATUS_WAITING).asc("createTime").setMaxResults(maxSize));
	}
}
